#!/bin/bash

filec="c"
filecpp="cpp"
filejava="java"
filepy="py"

for file in ./*
do 
	if test -f $file
	then
		if [ "$filec" = "${file##*.}" ]
		then
			astyle --style=ansi --suffix=none $file
		elif [ "$filecpp" = "${file##*.}" ]
		then
			astyle --style=ansi --suffix=none $file
		elif [ "$filejava" = "${file##*.}" ]
		then 
			astyle --style=java --suffix=none $file
		fi
	fi
done	
exit 0
